import request from '@/utils/request';

// 获取产品列表
export async function protocolProductList(params) {
  return request(`/nsApi/suppBusiScope/getPdListBySuppAndArea`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 供应商调出供应商协议
export async function getAgreementData(params) {
  return request(`/nsApi/suppProto/list`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 缴纳明细列表
export async function paymentDetailsList(params) {
  return request(`/nsApi/sendAdd/queryPayDetail`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 增员列表
export async function increasePersonnelList(params) {
  return request(`/nsApi/sendAdd/page`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
// 增员字典
export async function AccusearrchDicList(params) {
  return request(`/osApi/mdm/nmDict/queryDictItemsByCodes`, {
    method: 'POST',
    body: params,
  });
}

// 模糊客户名称
export async function getCustList(params) {
  return request('/nsApi/customer/mdCustList', {
    method: 'POST',
    body: params,
  });
}

// 关联协议
export async function relationxiList(params) {
  return request(`/nsApi/sendAdd/querySendInfo`, {
    method: 'POST',
    body: params,
  });
}

// 新建协议
export async function subAgreement(params) {
  return request(`/nsApi/suppProto/insert`, {
    method: 'POST',
    body: params,
  });
}

// 增员关联人数
export async function relationNumber(params) {
  return request(`/nsApi/sendAdd/match/count`, {
    method: 'POST',
    body: params,
  });
}

// 页签查询
export async function getTagList(params) {
  return request(`/nsApi/sendAdd/count/isHasData`, {
    method: 'POST',
    body: params,
  });
}

// 获取供应商.
export async function fetchSupplierList(params) {
  return request(`/nsApi/suppBusiScope/suppNameListByBusi `, {
    method: 'POST',
    body: params,
  });
}

// 获取供应商协议
export async function agreementList(params) {
  return request(`/nsApi/suppProto/pageList`, {
    method: 'POST',
    body: params,
  });
}

// 保存并发单
export async function invoicList(params) {
  return request(`/nsApi/sendAdd/sendAdd`, {
    method: 'POST',
    body: params,
  });
}

// 减员列表
export async function reduceemployeeList(params) {
  return request(`/nsApi/sendDedu/page`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 减员详情
export async function reduceemployeeDetail(params) {
  return request(`/nsApi/sendDedu/querySendOrdDetail`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
// 问题人员列表
export async function getProList(params) {
  return request(`/nsApi/sendProb/page`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 发单增员详情
// 详情中的基本信息
export async function orderDetails(params) {
  return request(`/nsApi/sendAdd/querySendOrdDetail`, {
    method: 'POST',
    body: params,
  });
}

// 问题人员详情中的基本信息
export async function getProDetail(params) {
  return request(`/nsApi/sendProb/detail`, {
    method: 'POST',
    body: params,
  });
}
// 问题人员详情中的反馈和标记
export async function getFeedback(params) {
  return request(`/nsApi/sendProb/createFdbk`, {
    method: 'POST',
    body: params,
  });
}

// 发单管理
// 减员列表：页签数量
export async function empTabNum(params) {
  return request(`/nsApi/sendDedu/count/isHasData`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 减员列表：发单
export async function sendTask(params) {
  return request(`/nsApi/sendDedu/deduTask/push`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
// 增员：取消发单
export async function cancelSend(params) {
  return request(`/nsApi/sendAdd/sends/cancel`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 去关联协议 - 发单前查看其他供应商在职人员
export async function seeSupplierPeople(params) {
  return request(`/nsApi/sendAdd/sendProt/get`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 发单：判断有无任务进度(暂无接口)
export async function checkHasTask(params) {
  return request(`/nsApi/`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 发单：获取任务id
export async function getBatchId(params) {
  return request(`/nsApi/sendAdd/sendOrdAddInfo/push/recvService`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
// 发单：获取进度数据
export async function getProgress(params) {
  return request(`/csApi/batchTask/getBatTaskInfo`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 查看客户协议关联情况列表
export async function getAssoDetailData(params) {
  return request(`/nsApi/nsSendQuery/send/prot/query`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 解绑
export async function untying(params) {
  return request(`/nsApi/sendAdd/sendPort/cacel`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 仅发单
export async function orderOnlyData(params) {
  return request(`/nsApi/sendAdd/sendOrdAddInfo/push/recvService/onlySend`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
